﻿<admintpl file="header" />
</head>
<body class="J_scroll_fixed">
		<div class="wrap jj">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('Gm/give')}">游戏币发放</a></li>
		</ul>		
		<div class="common-form">
			<form method="post" class="form-horizontal" action="{:U('Gm/give_verify')}">
				<fieldset>
					<div class="control-group">
					
					<label class="control-label">游戏币种:</label>
						<div class="controls">
							<select class="select_2" id="app_id" name="app_id" id="selected_id" onchange= "changeProvince()">
								<foreach name="gamemoneys"  key="k" item="vo">
									<php>$g_select=$k==$app_id ?"selected":"";</php>
									<option value="{$k}"{$g_select}>{$vo}</option>
								</foreach>
							</select>	
						</div>
					</div>
					
					<div class="control-group">
						<label class="control-label">拥有数量:</label>
						<div class="controls">
							<input type="text" class="input" name="remain" id="remain" style="color:blue;" value="" readonly="readonly" >
							<!--<label class="control-label" style="text-align:left"><span id="remain"></sapn></label>-->
						</div>
					</div>
					
					<div class="control-group">
						<label class="control-label">玩家账号:</label>
						<div class="controls">
							<input type="hidden" class="input" name="username" id="username" value="{$username}">
							
							<label class="control-label" style="text-align:left">{$username}</label>
						</div>
					</div>
					
										
					<div class="control-group">
						<label class="control-label">请填写充值游戏币数量:</label>
						<div class="controls">
							<input type="text" class="input" name="newgm" value="" autocomplete="off">
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">请填写充值金额:</label>
						<div class="controls">
							<input type="text" class="input" name="amount" value="" autocomplete="off">
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">请填写备注:</label>
						<div class="controls">
							<input type="text" class="input" name="beizhu" value="" autocomplete="off">
						</div>
					</div>
				</fieldset>
				<div class="form-actions">
					<input name="adminsite" type="hidden"  id="adminsite" value="{:U('Gm/ajaxGetgm')}">
					<button type="submit"	class="btn btn-primary btn_submit">确认</button>
				</div>
			</form>
		</div>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<script type="text/javascript">
	$(function(){
		$('#app_id').change(function(e){
			var app_id = $("#app_id").val();
			var takeclass = $("#takeclass").val();
			
			var adminsite = $("#adminsite").val() + "?app_id="+app_id+"&takeclass=1";
			$.ajax({
				url: adminsite,
				type: "GET",
				success: function(data) {
					if (data == "noexit") {
						$("#remain").val(0);	
					} else {
						$("#remain").val(data);
					}
				} 	
			});		
		})
	});
	</script>
</body>
</html>